/**
 *  JFTSTool - Java Full Text Search tool.
 *  Copyright (C) <2009>  <grupo JFTS>
 *  This program is free software: you can redistribute it and/or modify
 *	it under the terms of the GNU General Public License as published by
 *	the Free Software Foundation, either version 3 of the License, or
 *	(at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *  
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.jftstool.semantic;

import org.jftstool.semantic.exceptions.JFTSSemanticException;

import com.hp.hpl.jena.ontology.OntModel;

/**
 * @author grupo JFTS
 *
 */
public interface ISemanticModel {
	
	/**
 	 * Create a new semantic model based on data taken from JFTS configuration file. 
	 * @throws JFTSSemanticException
	 */
	public void createSemanitcModel() throws JFTSSemanticException;
	
	/**
	 * Loads the semantic model in memory.
	 * @throws JFTSSemanticException
	 */
	public void loadSemanicModel() throws JFTSSemanticException;
	
	/**
	 * Add a new instance of the ontologic model.
	 * @param className the class to which belongs.
	 * @param instanceName Instance name
	 * @param replace If the instance already exists, replaces it or not.
	 * @throws JFTSSemanticException
	 */
	public void addNewInstance(String className, String instanceName, boolean replace) throws JFTSSemanticException;
	
	/**
	 * Removes an instance of the ontological model.
	 * @param instanceName Name of the instance to remove
	 * @throws JFTSSemanticException
	 */
	public void removeInstance(String instanceName) throws JFTSSemanticException;
	
	/**
	 * Returns the path from the root to the kind received as a parameter expressed as a path.
	 * @param className
	 * @param model
	 * @return Return String
	 * @throws JFTSSemanticException
	 */
	public String getOntClassPath(String className, OntModel model) throws JFTSSemanticException;
	
	/**
	 * Returns the base ontological model.
	 * @return Return base model
	 */
	public OntModel getBaseModel();
	
	/**
	 * Returns the ontological model inferred.
	 * @return Return inferred model
	 */
	public OntModel getInfModel();
}